<?php
include_once("../configure/admin.config.inc.php");//--> admin global var
include_once("db.inc.php");						//--> db global var
include_once("Operation.php");					//--> Operation
include_once("Manufacturer.php");				//--> Manufacturer
require_once("controlHeader.php");				//--> system control header

$objOperate			= new Operation($objSession->getLanguage());	//--> Operation instance
$objManufacturer 	= new Manufacturer(DB_TAG_SYSTEM, $uid);		//--> Manufacturer

$arrOperate = $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid);

if(isset($_GET['id']) && !empty($_GET['id'])){
	$id = $_GET['id'];

	$isReturn = $objManufacturer->delete($arrOperate, $id);
	
	if($isReturn)
		$error_message = 'delete successfully.';
	else 
		$error_message = 'delete failure.';
	
}


echo "<script language='javascript'>";
echo "alert(\"$error_message\");";
echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";";
echo "</script>";

//$backurl = $_SERVER['HTTP_REFERER'];
//header("Location: $backurl");
?>
